this._settings.connect('changed::dynamic-workspaces',
this._updateSwitcherVisibility.bind(this));
- Main.layoutManager.connect('monitors-changed', this._rebuildThumbnails.bind(this));
+ Main.layoutManager.connect('monitors-changed', () => {
+ this._destroyThumbnails();
+ if (Main.overview.visible)
+ this._createThumbnails();
+ });
this._switchWorkspaceNotifyId = 0;
this._nWorkspacesNotifyId = 0;
Main.overview.connect('windows-restacked',
this._syncStacking.bind(this));
- this._workareasChangedId =
- global.display.connect('workareas-changed',
- this._rebuildThumbnails.bind(this));
-
this._targetScale = 0;
this._scale = 0;
this._pendingScaleUpdate = false;
this._syncStackingId = 0;
}
- if (this._workareasChangedId > 0) {
- global.display.disconnect(this._workareasChangedId);
- this._workareasChangedId = 0;
- }
-
for (let w = 0; w < this._thumbnails.length; w++)
this._thumbnails[w].destroy();
this._thumbnails = [];
this._porthole = null;
},
- _rebuildThumbnails() {
- this._destroyThumbnails();
-
- if (Main.overview.visible)
- this._createThumbnails();
- },
-
_workspacesChanged() {
let validThumbnails =
this._thumbnails.filter(t => t.state <= ThumbnailState.NORMAL);